<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<title>道义兄弟</title>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Home/default/css/reset.min.css"/>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Home/default/css/swiper.min.css"/>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Home/default/css/layout.css"/>
<script type="text/javascript" src="__PUBLIC__/Home/default/js/fontResize.js"></script>
<script type="text/javascript" src="__PUBLIC__/Home/default/js/jquery-1.7.2.min.js"></script>
</head>
<body>
<div class="jbPhoneTip"></div>
<div class="wrap card">
	<div class="swiper-container">
	        <div class="swiper-wrapper">
	                <div class="swiper-slide">
	                        <a href="javascript:;">
	                           	<img src="__PUBLIC__/Home/default/img/slide1.jpg" alt="">
	                        </a>
	                   </div>
	                  <div class="swiper-slide">
	                        <a href="javascript:;">
	                           	<img src="__PUBLIC__/Home/default/img/slide1.jpg" alt="">
	                        </a>
	                   </div>
	          </div>
	          <div class="swiper-pagination"></div>
	</div>  
	<div class="goods_list">
		<ul>
			<volist name="goods" id="goods">
				<if condition="($goods['status'] eq 上架) OR ($goods['status'] eq 下架) ">
					<li>
						<if condition="$goods['status'] eq 上架">
							<a href="javascript:;" class="pay" id="{$goods['id']}">
						<else />
							<a href="javascript:;" class="disabled">
						</if>
							<div class="goods_img" style="background: url({$goods['img']}) no-repeat;background-size: 100% 100%"></div>
							<div class="good_con">
								<h5>{$goods['name']}{$goods['status']}</h5>
								<div class="dec">{$goods['info']}</div>
							</div>
						</a>
					</li>
				<else />
				</if>
			</volist>
		</ul>
	</div>
	<div class="notice_box">
		<div class="icon"></div>
		<div class="text">提示：部分商品第二天上架时间调整我们会另行通知</div>
	</div>
</div>

<script type="text/javascript" src="__PUBLIC__/Home/default/js/compareCode.js"></script>
<script type="text/javascript" src="__PUBLIC__/Home/default/js/swiper.min.js"></script>
<script type="text/javascript">
$(function(){
      var mySwiper = new Swiper('.swiper-container',{
          pagination: '.swiper-pagination',
          loop:true,
          grabCursor: true,
          paginationClickable: true,
          autoplay: 2500,
          active: true
      });

      //商品禁止购买
      $('.disabled').click(function() {
      	show_message('此商品已下架不能购买');
      });

      //请求pay页面
      $('.goods_list .pay').click(function(){
      	id=$(this).attr('id');
      	obj=$(this);
      	post={
      		id:id,
      	}
      	$.ajax({
      		url: 'index.php?s=/Home/order',
      		type: 'POST',
      		dataType: 'json',
      		data: post,
      		success:function(re){
  				window.location="index.php?s=/Home/order/id/"+id;
      		}
      	})
      	
      });
});
</script>
</body>
</html>
